<?php $form=$this->beginWidget('bootstrap.widgets.TbActiveForm',array(
	'id'=>'category-form',
    'type'=>'horizontal',
    'inlineErrors'=>false,
	'enableAjaxValidation'=>false,
    'htmlOptions'=>array('enctype'=>'multipart/form-data')
    )) ?>

	<p class="help-block"><?php echo Yii::t('notices','Fields with <span class="required">*</span> are required.'); ?></p>

	<?php echo $form->textFieldRow($model,'name',array('class'=>'span5','maxlength'=>50)); ?>

	<?php echo $form->dropDownListRow($model,'type_id', CHtml::listData(Type::model()->findAll(),'id','name'), array(
        'class'=>'span5',
        'empty'=>Yii::t('labels','empty')
    )); ?>    

    <?php echo $form->fileFieldRow($model,'image',array('hint'=>Yii::t('help','Upload image for your category'))); ?>        
    
    <?php echo $form->dropDownListRow($model, 'status', array('1'=>'Active','0'=>'Inactive'),array('empty'=>Yii::t('labels','empty'))); ?>

	<?php echo $form->textAreaRow($model,'description',array('rows'=>6, 'cols'=>30, 'class'=>'span5')); ?>    

	<div class="form-actions">
		<?php $this->widget('bootstrap.widgets.TbButton', array(
			'buttonType'=>'submit',
			'type'=>'primary',
			'label'=>$model->isNewRecord ? Yii::t('zii','Create') : Yii::t('zii','Save'),
		)); ?>
	</div>

<?php $this->endWidget(); ?>
